Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Using JTOpen / JT400 in agents
Feedback Type: Problem
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Functionality
Platform: Windows Vista client
Release: 8.5.1
Reproducible: Always

I'm using JTOpen to run as JDBC connection to out iSeries.

Here's the agent code:

= = = Start of listing = = =
import java.sql.Connection;
import java.sql.DriverManager;

import lotus.domino.AgentBase;
import lotus.domino.AgentContext;
import lotus.domino.Session;

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();

Class.forName("com.ibm.as400.access.AS400JDBCDriver");

Connection conn = DriverManager.getConnection(
"jdbc:as400://xxx.xxx.xxx.xxx", "UserId", "password");

System.out.println("Catalog: " + conn.getCatalog());
System.out.println("Is closed? " + conn.isClosed());

} catch (Exception e) {

e.printStackTrace();

}
}
}
= = = End of listing = = =

This code runs sort of OK the first time in Designer and
the Java console output looks like this:

= = = Start of listing = = =
Catalog: OurIseriesName
Is closed? false
Error cleaning up agent threads
= = = End of listing = = =

Note the error message "Error cleaning up agent threads".

When I run the agent again, I get this error in the Java console:

= = = Start of listing = = =
java.lang.OutOfMemoryError
= = = End of listing = = =

And in the Agent completion message in Designer:

= = = Start of listing = = =
Started running agent 'test2' on 01/12/2009 13:29:15
ERROR: JVM: Attempt to retrieve Java agent attachments failed.
Ran Java Agent Class
Done running agent 'test2' on 01/12/2009 13:29:22
= = = End of listing = = =

I've scanned the usual places for information, but have found only vague references to multiple threads being created. Has anyone else seen this problem? I've extended the code to actually pull back data from the iSeries and this works OK the first time round, retrieving rows correctly. It seems that the first time this runs, something is not terminated correctly in the JVM.

This works fine in Eclipse using the same core code.


Feedback number WEBB7YBHVZ created by ~Kelly Ekfookony on 12/01/2009

Status: Open
Comments:

Using JTOpen / JT400 in agents (~Kelly Ekfookon... 1.Dec.09)
. . Solution found (~Kelly Ekfookon... 2.Dec.09)
. . . . This is still flaky (~Kelly Ekfookon... 2.Dec.09)
. . Close Connection (~Mary Xanjipybu... 1.Dec.09)
. . . . More code (~Kelly Ekfookon... 1.Dec.09)
. . . . . . Do not recycle your session (~Mary Xanjipybu... 1.Dec.09)
. . . . . . . . This doesn't seem to make any diffe... (~Kelly Ekfookon... 2.Dec.09)
. . Don't import the jt400 jar (~Dexter Zengero... 2.Dec.09)
. . . . That's interesting (~Kelly Ekfookon... 2.Dec.09)
. . . . That seems to work OK. (~Kelly Ekfookon... 3.Dec.09)
. . Code and configuration (~Mary Xanjipybu... 2.Dec.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS